#ifndef USER_H_
#define USER_H_
#include "Bank.h"
#include "Resources.h"
#include "EnergyMarketLogger.h"
#include <vector>
#include <string>
using namespace std;

class User{

protected:

	int _id;

	vector<Resources> _res;

	BankAccount *_account;


public:
	User();
	User(int newId, Bank& newBank, double firstYitra); //resTypes is sent from the clas that builds the users and dies right after the build is completed

	//getters
	double getYitra();
	int getId();
	double getProfit();
	Resources getResource(ass2::eEnergy type);
	void endOfDay();

	//All energy resources are held only by the users
	void createEnergy(ass2::eEnergy type, int amount);
	void consumeEnergy(ass2::eEnergy type, int amount);
	void sellEnergy(ass2::eEnergy type, int amount, double price);
	void buyEnergy(ass2::eEnergy type, int amount, double price);


	virtual ~User();
};

#endif /*USER_H_*/
